const { log } = require('console')
const { contextBridge, ipcRenderer } = require('electron')

ipcRenderer.on("port", e => {
  window.electronMessagePort = e.ports[0]
  window.electronMessagePort.onmessage = MessageEvent => {
    log(MessageEvent)
  }
})